﻿using BlondeHeaven.DB.Model;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BlondeHeaven.BLL.Interface
{
    public interface IBllShopKeeperService<T> where T : class, new()
    {
        /// <summary>
        /// 增加商品
        /// </summary>
        /// <param name="model"></param>
        /// <param name="IsSave"></param>
        /// <returns></returns>
        T Add(T model, bool IsSave);

        /// <summary>
        /// 修改商品
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        T ChangeShopKeeperInformation(T model, bool IsSave);


        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="model"></param>
        /// <param name="IsSave"></param>
        /// <returns></returns>
        T RemoveAsync(T model, bool IsSave);

        /// <summary>
        /// 根据Id查询
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetByoneId(int id);

        /// <summary>
        /// 模糊查询店铺
        /// </summary>
        /// <param name="Name"></param>
        /// <returns></returns>
        List<ShopKeeper> GetByoneName(string Name);
        /// <summary>
        /// 查询所有店铺
        /// </summary>
        /// <returns></returns>
        List<ShopKeeper> GetAllshop();
        /// <summary>
        /// 保存数据库
        /// </summary>
        /// <returns></returns>
        int SaveChanges();
    }
}
